Pluralsight Practical IoC With ASP.NET MVC 4
At first, Inversion of Control (IoC) is a difficult concept to understand. Even after understanding what IoC is, a developer must learn to apply the concepts of IoC and IoC containers to a real application in order to use it effectively. In this course, John will show you how to use the Unity IoC container in an ASP.NET MVC 4 application to use dependency injection on controllers, filters, views and more. You’ll start off by learning the basics of IoC containers, how they work and why they are important. As well as, learning about how internally ASP.NET MVC 4 creates controllers and views. In order to understand practically how dependency injection works (the core function of IoC containers)John will walk you through manually doing dependency injection in ASP.NET MVC 4 using your own custom controller factory. After you have done things manually, you’ll see how to add the Microsoft Unity IoC container to your MVC 4 application to do dependency injection automatically. Essentially you'll see how it is able to give us more flexibility and reduce the custom code we need to write. John then takes things even further by exploring some advanced dependency injection techniques using Unity to inject views and filters. He’ll also cover some of the advanced features of the Unity IoC container. Finally, you’ll take a tour through some other popular .NET IoC containers and see how to get them working in our ASP.NET MVC 4 application. After taking this course you will be equipped with the skills and knowledge you need to build real applications using Inversion of Control and dependency injection.
Introduction | 00:24:02 |
| Introduction | 00:54 |
| Who This Course is for? | 01:16 |
| What This Course Covers. | 01:28 |
| ASP.NET MVC Basics | 01:10 |
| How Controllers Are Created | 01:18 |
| How Views Are Created | 01:17 |
| IoC Basics | 01:46 |
| IoC Basics 2 | 01:53 |
| Run Down of IoC Containers | 01:24 |
| What About MEF? | 00:51 |
| Creating The Project | 01:47 |
| The Project | 04:39 |
| Creating A Unit Test | 03:46 |
| Up Next | 00:33 |
Doing It Yourself | 00:25:45 |
| Introduction | 01:26 |
| The Problem | 02:22 |
| The Solution | 01:34 |
| Looking at The Project | 02:07 |
| Inverting The Control | 03:06 |
| Broken Controller | 01:04 |
| Controller Factories | 00:52 |
| Creating A Custom Factory | 04:42 |
| Registering The Factory | 01:48 |
| Unit Tests | 03:41 |
| More Problems | 02:20 |
| Up Next | 00:43 |
Injecting With Unity | 00:18:14 |
| Introduction | 00:50 |
| Using IoC | 01:21 |
| Plugging in Unity | 01:15 |
| About Unity | 01:40 |
| Getting Unity | 01:34 |
| Setting Up Unity | 02:43 |
| Registering The Types | 02:33 |
| Using Convention | 05:26 |
| Up Next | 00:52 |
Advanced Injection | 00:32:14 |
| Introduction | 01:03 |
| View Injection | 01:14 |
| Creating The Base Page | 04:00 |
| Injecting Into The View | 01:52 |
| Filter Injection | 01:11 |
| Creating The Filter | 04:10 |
| Applying The Filter | 03:25 |
| A Common Problem | 02:45 |
| Using Injection Constructor | 02:27 |
| Using Register Instance | 02:41 |
| Named Registration | 03:08 |
| Using Named Registration | 03:36 |
| Up Next | 00:42 |
Using Other IoC Containers | 00:34:58 |
| Introduction | 01:03 |
| Ninject | 00:27 |
| Cleaning Up | 01:27 |
| Using Ninject | 05:30 |
| Structure Map | 00:22 |
| Using StructureMap | 02:59 |
| Autofac | 00:26 |
| Using Autofac | 05:40 |
| Castle Windsor | 00:33 |
| Using Windsor | 06:34 |
| Simple Injector | 00:46 |
| Using Simple Injector | 08:01 |
| The End | 01:10 |
Introduction
Doing It Yourself
Injecting With Unity
Advanced Injection